Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


PreviousPrevious NextNext

~Karl Zenaverobu 19.Jan.04 11:03 AM a Web browser
Notes Client All Releases All Platforms

The users submit a file attachment on the web via a file upload control. All I am trying to do on the client is get the attachment from $file and move it to my rich text field on the form (purely for display purposes).

Following it in the debugger I get hold of everything but a messagebox comes up saying the file "filename" could not be found (when I get to the line (Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", filestring), even though its there??

Any ideas

My full code is :

Dim s As New NotesSession
Dim ui As New notesuiworkspace
Dim doc As NotesDocument
Dim db As notesdatabase
Dim object As NotesEmbeddedObject
Dim filestring As String
Dim uidoc As notesuidocument

Set db=s.Currentdatabase
Set uidoc = ui.currentdocument
Set doc=uidoc.document
Dim item As notesitem

Dim rtitem As NotesRichTextItem

If doc.hasitem ("attachment") Then
Set rtitem=doc.getfirstitem("attachment")
Set rtitem = doc.CreateRichTextItem( "attachment" )
End If

If doc.hasitem("$file") Then
Set item = doc.getfirstitem("$file")

Set notesEmbeddedObject = doc.GetAttachment( item.values(0) )

filestring =
Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", filestring)
End If

Call doc.RemoveItem( "$FILE" )
Call doc.Save( True, True )

Getting attached files from $file a... (~Karl Zenaverob... 19.Jan.04)
. . RE: Getting attached files from $fi... (~Keiko Dwojipyt... 19.Jan.04)
. . All attachments regardless of their... (~Dan Elhipister... 19.Jan.04)
. . RE: Getting attached files from $fi... (~Wei Frojipyman... 19.Jan.04)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS